package com.ubing.boot.notesforjava.test.leetcode;

// 反转二叉树的奇数层 TODO
public class ReverseOddLevels {
    public class TreeNode {
          int val;
          TreeNode left;
          TreeNode right;
          TreeNode() {}
          TreeNode(int val) { this.val = val; }
          TreeNode(int val, TreeNode left, TreeNode right) {
              this.val = val;
              this.left = left;
              this.right = right;
          }
    }
// [2,3,5,8,13,21,34]
    public TreeNode reverseOddLevels(TreeNode root) {
        TreeNode treeNode = new TreeNode(2, new TreeNode(3, new TreeNode(8), new TreeNode(13)), new TreeNode(5, new TreeNode(21), new TreeNode(34)));
        TreeNode t=treeNode;
        int i=0;
        while (t.left!=null){
            t=t.left;
            i++;
        }
        System.out.println(1<<1);
        return new TreeNode(0);
    }

    public static void main(String[] args) {
        ReverseOddLevels reverseOddLevels = new ReverseOddLevels();
        TreeNode treeNode = reverseOddLevels.reverseOddLevels(null);

    }
}
